package com.home.enums;

/**
 * @author chenxf
 * @date 2022/4/15 14:35
 */
public enum FetchTypeEnum {
    GOV_SITE("gov", "合同模板审批流程"),
    KJG_GOV_SITE("kjg_gov", "合同模板审批流程"),
    NONE("NONE","未匹配站点")
    ;

    private final String key;
    private final String desc;

    FetchTypeEnum(String key, String desc) {
        this.key = key;
        this.desc = desc;
    }

    public static FetchTypeEnum get(String key){
        for (FetchTypeEnum ele : values()) {
            if(ele.getKey().equals(key)){
                return ele;
            }
        }
        return FetchTypeEnum.NONE;
    }

    public String getKey() {
        return key;
    }

    public String getDesc() {
        return desc;
    }
}
